import CryptoJS from 'crypto-js'

export default {
    // 解密
    decrypt(word: string) {
        const keyStr = '1dddf3a91316460092016a11c5393044'; // keyStr是aes加密需要用到的16位字符串的key
        const key = CryptoJS.enc.Utf8.parse(keyStr);
        const decrypt = CryptoJS.AES.decrypt(word, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
        return CryptoJS.enc.Utf8.stringify(decrypt).toString()
    }
}